
    <div class="group-buy-user-wrap">
        <ul class="group-buy-user fix">
            <{foreach from=$detail.orders item="order"}>
            <li class="li">
                <img class="img" src="<{$order.userIcon}>" alt="">
                <{if $order.isCreater}>
                <em class="tuan-icon"></em>
                <{/if}>
            </li>
            <{/foreach}>

            <{foreach from=$detail.wants item="n"}>
            <li class="li">
                <img class="img" src="/resource/app/imgs/default_touxiang.png" alt="">
            </li>
            <{/foreach}>
        </ul>
    </div>

    <p class="group-buy-info">还差<span class="red"><{$detail.wantPersons}></span>人，盼你如南方人盼暖气~</p>

    <p class="group-buy-surplus-time fix">
        <span class="left"></span>
        <span class="middle pindan-end">剩余<span class="red shengyu">24: 00: 00</span>结束</span>
        <span class="left"></span>
    </p>

    <p class="group-buy-kaituan-time fix">
        <span class="left"><img src="<{$detail.tuanMasterIcon}>" class="img" alt=""></span>
        <span class="middle"><{$detail.tuanMasterName}></span>
        <span class="right"><em class="kaituan-date"><{"Y-m-d H:i:s"|date:$detail.startTime}></em>开团</span>
    </p>

    <{if $detail.wantPersons > 0}>
    <p class="group-buy-less">
        <span class="left"><img src="<{$global_user.userIcon}>" class="img" alt=""></span>
        <span class="middle">还差<{$detail.wantPersons}>人，让小伙伴们都来组团吧！</span>
    </p>
    <{/if}>

    <p class="group-buy-chakan fix">
        <span class="left">拼团玩法</span>
        <a href="/tuan/tipstext" class="right" title="">查看详情 <em class="back-icon"></em></a>
    </p>

    <script>

    // 倒计时

    function countdown() {

        /*
        var nowTime = (new Date('<{$nowTime}>')).getTime() / 1000; // 打开页面瞬时服务器时间

        var kaituanTime = (new Date($('.kaituan-date').html()).getTime()) / 1000; // 开团时间

        var endTime = kaituanTime + (24 * 60 * 60); // 结束时间

        var leftSecond = endTime - nowTime; // 距离结束时间剩余的秒数
        */
        var leftSecond = <{$timeLeftSeconds}>;

        function theTime(){

            var h = parseInt((leftSecond / 3600) % 24);
            var m = parseInt((leftSecond / 60) % 60);
            var s = parseInt(leftSecond % 60);

            function checkTime(i) {
                if (i < 10) {
                    i = "0" + i;
                }
                return i;
            }

            h = checkTime(h);
            m = checkTime(m);
            s = checkTime(s);

            $('.shengyu').html(h + ': ' + m + ': '+ s);

             leftSecond --;

            if (leftSecond < 0 ) {
                 $('.pindan-end').html('团购已结束');
                 return false;
            }

            setTimeout(theTime, 1000);
        }

        theTime();

    }

    countdown();

    </script>
